﻿<?php
use Classes\autoload\SplClassLoader;
use Classes\db\DBConnection;
use Classes\Login;
use Classes\UserPrincipal;
use html\RenderHTML;

include '../Classes/UserPrincipal.php';
include '../html/RenderHTML.php';

require '../Classes/autoload/SplClassLoader.php';
$loader = new SplClassLoader ();
$loader->register ();

session_start ();

if (! isset ( $_SESSION ['userPrincipal'] ) || $_SESSION ['userPrincipal']->getRank () != 10) {
	header ( "Location: ../index.php" );
	exit ();
}

html\RenderHTML::renderHeader ( 'Начало' );
html\RenderHTML::addStyle ( '../styles/global.css' );
html\RenderHTML::addStyle ( '../styles/index.css' );
html\RenderHTML::renderBody ();

echo '<a href="../logout.php">Изход</a>';
echo '<a href="../home.php">Начало</a>';

html\RenderHTML::renderFooter ();

